﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="DANHibernate" namespace="DANHibernate">
  <class name="LazyUser" table="tbl_user" lazy="true" proxy="LazyUser">    
      <id name="UserId" column="user_id" type="integer">
      <generator class="identity" />
    </id>

    <bag name="Phones" cascade="none" lazy="true">
      <key column ="user_id" />
      <one-to-many class="DANHibernate.Phone" />
    </bag>

    <property name="FirstName" column= "first_name" type="String" length="50"/>
    <property name="LastName" column= "last_name" type="String" length="50"/>

  </class>
</hibernate-mapping>
